/* --------------------------------------------------------
 * Copyright (c) aeky , Inc.  All rights reserved.
 * --------------------------------------------------------
 */
package com.aeky.client.common;

import java.util.Date;

import com.google.gwt.i18n.client.DateTimeFormat;

/**
 * 
 * @author aeky
 */
public class DateUtils {
    /**
     * 根据指定的format格式化指定日期
     * 
     * @param date
     * @param format
     * @return String
     */
    public static String formatDateTime(Date date, String format) {
        if (date == null || format == null || "".equals(format.trim())) {
            return "";
        }
        return DateTimeFormat.getFormat(format).format(date);
    }
}
